﻿
using System;

namespace Quail
{
    public partial class WebForm : WebControl
    {
        public WebForm(WebControlContainer container, string selector)
            : base(container, selector)
        {
        }

        public WebForm(WebControl control)
            :base(control)
        {
        }


        public void Submit()
        {
            var l = Locator;
            var task = BeginTask("Submit");
            try
            {
                Page.Browser.SeleniumInterface.Submit(l);
                Page.Sync();
                task.Finish();
            }
            catch (Exception e)
            {
                task.Finish(e);
                throw;
            }
        }
    }
}
